namespace Terra.Core.Configuration.Options
{
    /// <summary>
    /// 数据库配置
    /// </summary>
    public class DatabaseSettings
    {
        /// <summary>
        /// 数据库类型(SqlServer/MySql/PostgreSQL)
        /// </summary>
        public string Provider { get; set; } = "SqlServer";

        /// <summary>
        /// 连接字符串
        /// </summary>
        public string ConnectionString { get; set; } = "";

        /// <summary>
        /// 是否启用自动迁移
        /// </summary>
        public bool EnableAutoMigration { get; set; } = false;

        /// <summary>
        /// 命令超时时间(秒)
        /// </summary>
        public int CommandTimeout { get; set; } = 30;

        /// <summary>
        /// 是否启用详细日志
        /// </summary>
        public bool EnableDetailedLogging { get; set; } = false;

        /// <summary>
        /// 最大重试次数
        /// </summary>
        public int MaxRetryCount { get; set; } = 3;

        /// <summary>
        /// 重试间隔(秒)
        /// </summary>
        public int RetryInterval { get; set; } = 5;
    }
}